<?php
/**
 +------------------------------------------------------------------------------
 * 日志处理类
 +------------------------------------------------------------------------------
 */
class Log
{
	// 日志信息
    static $log_array = array();

	/**
     +----------------------------------------------------------
     * 保存日志信息
     +----------------------------------------------------------
     * @param string $message 日志信息
     +----------------------------------------------------------
     * @return void
     +----------------------------------------------------------
     */
    static function start() {
		self::$log_array[] = array('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />','Black');
    }
    
    /**
     +----------------------------------------------------------
     * 保存日志信息
     +----------------------------------------------------------
     * @param string $message 日志信息
     +----------------------------------------------------------
     * @return void
     +----------------------------------------------------------
     */
    static function record($message,$color="Black") {
		self::$log_array[] = array($message ."\r\n",$color);
    }
    
    /**
     +----------------------------------------------------------
     * 显示日志信息
     +----------------------------------------------------------
     * @param string $message 日志信息
     +----------------------------------------------------------
     * @return void
     +----------------------------------------------------------
     */
    static function view() {
    	foreach (self::$log_array as $log){
			echo '<font color="'.$log[1].'" size=2>'.$log[0].'<br></font>';
		}
    }
}
?>